/* Copyright [2022] Exegin Technologies Limited. All rights reserved. */

#include "zcl/se/zcl.device_mgmt.h"

#ifndef ZCL_DEVICE_MGMT_ATTR_CALLBACK
# define ZCL_DEVICE_MGMT_ATTR_CALLBACK              NULL
# define ZCL_DEVICE_MGMT_ATTR_FLAGS                 ZCL_ATTR_FLAG_NONE
/* By default, disable reporting */
# define ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN      0x0000U
# define ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX      0xffffU

#else
# ifndef ZCL_DEVICE_MGMT_ATTR_FLAGS
/* If callback is defined, must also define read/write callback flags:
 * ZCL_ATTR_FLAG_CB_READ | ZCL_ATTR_FLAG_CB_WRITE */
#  error "ZCL_DEVICE_MGMT_ATTR_FLAGS not defined"
# endif
# ifndef ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN
#  error "ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN not defined"
# endif
# ifndef ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX
#  error "ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX not defined"
# endif
#endif

#define ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(id) \
    { \
        id, ZCL_DATATYPE_BITMAP_8BIT, \
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0x00, 0xff}, \
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX} \
    }

static const struct ZbZclAttrT zcl_device_mgmt_server_custom_attr_list[] = {
    /* Supplier Control Attribute Set */
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProviderID, ZCL_DATATYPE_UNSIGNED_32BIT,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProviderName, ZCL_DATATYPE_STRING_OCTET,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 16U, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProviderContactDetails, ZCL_DATATYPE_STRING_OCTET,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 19U, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderID, ZCL_DATATYPE_UNSIGNED_32BIT,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderName, ZCL_DATATYPE_STRING_OCTET,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 17U, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderChangeDate, ZCL_DATATYPE_TIME_UTC,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderChangeControl, ZCL_DATATYPE_BITMAP_32BIT,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderContactDetails, ZCL_DATATYPE_STRING_OCTET,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 20U, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },

    /* Tenancy Control Attribute Set */
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ChangeofTenancyUpdateDate, ZCL_DATATYPE_TIME_UTC,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },
    {
        ZCL_DEVICE_MGMT_SVR_ATTR_ProposedTenancyChangeControl, ZCL_DATATYPE_BITMAP_32BIT,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    }
};

static const struct ZbZclAttrT zcl_device_mgmt_client_custom_attr_list[] = {
    {
        ZCL_DEVICE_MGMT_CLI_ATTR_ProviderID, ZCL_DATATYPE_UNSIGNED_32BIT,
        ZCL_DEVICE_MGMT_ATTR_FLAGS, 0, ZCL_DEVICE_MGMT_ATTR_CALLBACK, {0, 0},
        {ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MIN, ZCL_DEVICE_MGMT_ATTR_REPORT_INTVL_MAX}
    },

    /* Price Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TOUTariffActivation),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_BlockTariffactivated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_BlockTOUTariffActivated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SingleTariffRateActivated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_AsychronousBillingOccurred),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SynchronousBillingOccurred),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TariffNotSupported),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PriceClusterNotFound),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformation),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsRejected),

    /* Metering Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CheckMeter),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_LowBattery),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TamperDetect),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SupplyStatus),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SupplyQuality),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_LeakDetect),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_BatteryFailure),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_LowVoltageL1),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_HighVoltageL1),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UnderVoltage),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_OverVoltage),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PressureTooLow),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PressureTooHigh),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCommandActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCommandCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SupplyON),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SupplyARMED),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SupplyOFF),

    /* Messaging Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_MessageConfirmationSent),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageRejected),

    /* Prepayment Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_LowCredit),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_NoCredit),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CreditExhausted),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditEnabled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditExhausted),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustment),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustFail),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PrepayClusterNotFound),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCreditReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCreditActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCreditCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCreditRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitRejected),

    /* Calendar Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CalendarClusterNotFound),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CalendarChangePassiveActivated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CalendarChangePassiveUpdated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysRejected),

    /* Device Management Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_Password1Change),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_EventLogCleared),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ChangepasswordActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINActioned),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINCancelled),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINRejected),

    /* Tunnel Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TunnelingClusterNotFound),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandGenerated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandGenerated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandGenerated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommandGenerated),

    /* OTA Event Configuration Attribute Set */
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareReadyForActivation),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareActivated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareActivationFailure),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ImageNotifyCommandReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ImageNotifyCommandRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageRequestGenerated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageResponseReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageResponseRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockRequestGenerated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockResponseReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockResponseRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndRequestGenerated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndResponseReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndResponseRejected),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileRequestGenerated),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileResponseReceived),
    ZCL_DEVICE_MGMT_EVENT_ATTR_ALLOCATOR(ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileResponseRejected)
};
